<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>教师端后台布局</title>
		<link rel="stylesheet" href="../css/layui.css">
		<script type="text/javascript" src="../js/vue.min.js"></script>
		<script type="text/javascript" src="../js/jquery.min.js"></script>
	</head>

	<body class="layui-layout-body">
		<div id="app">
			<div class="layui-layout layui-layout-admin">
				<div class="layui-header">
					<div class="layui-logo" style="font-size: 20px;color: #CAE1FF;">实验管理系统后台</div>
					<!-- 头部区域（可配合layui已有的水平导航） -->
					<ul class="layui-nav layui-layout-left">
						<!--	<li class="layui-nav-item">
						<a href="">控制台</a>
					</li>
					<li class="layui-nav-item">
						<a href="">商品管理</a>
					</li>
					<li class="layui-nav-item">
						<a href="">用户</a>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">其它系统</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="">邮件管理</a>
							</dd>
							<dd>
								<a href="">消息管理</a>
							</dd>
							<dd>
								<a href="">授权管理</a>
							</dd>
						</dl>
					</li> -->
					</ul>
					<ul class="layui-nav layui-layout-right">
						<li class="layui-nav-item">
							<a href="javascript:;">
								{{teacher.teaName}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</a>
							<dl class="layui-nav-child">
								<dd>
									<a href="../teacher/login/changeKeyd.html">修改密码</a>
								</dd>
								<dd>
									<a href="" onclick="quit()">安全退出</a>
								</dd>
							</dl>
						</li>

					</ul>
				</div>

				<div class="layui-side layui-bg-black">
					<div class="layui-side-scroll">
						<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
						<ul class="layui-nav layui-nav-tree" lay-filter="test">
							<li class="layui-nav-item layui-nav-itemed">
								<a class="" href="javascript:;">课程管理</a>
								<dl class="layui-nav-child">
									<dd>
										<a href="course/courseList.html" target="main">课程管理</a>
									</dd>
								</dl>
							</li>
							<li class="layui-nav-item layui-nav-itemed">
								<a class="" href="javascript:;">实验管理</a>
								<dl class="layui-nav-child">
									<dd>
										<a href="exp/expList.html" target="main">实验列表</a>
									</dd>
									<dd>
										<a href="exp/addExp.html" target="main">添加实验</a>
									</dd>
								</dl>
							</li>
							<li class="layui-nav-item layui-nav-itemed">
								<a class="" href="javascript:;">上机管理</a>
								<dl class="layui-nav-child">
									<dd>
										<a href="operate/operateList.html" target="main">上机列表</a>
									</dd>
									<dd>
										<a href="operate/addOperate.html" target="main">添加上机</a>
									</dd>
								</dl>
							</li>
							<li class="layui-nav-item layui-nav-itemed">
								<a class="" href="javascript:;">成绩管理</a>
								<dl class="layui-nav-child">
									<dd>
										<a href="score/experimentList.html" target="main">查看成绩</a>
									</dd>
								</dl>
							</li>
							<li class="layui-nav-item layui-nav-itemed">
								<a class="" href="stuhandle/stuhandle.html" target="main">学生管理</a>

							</li>
							<li class="layui-nav-item layui-nav-itemed">
								<a class="" href="teacherlog/teacherlog.html" target="main">日志管理</a>

							</li>
							<!-- <li class="layui-nav-item">-->
							<!-- <a href="javascript:;">解决方案</a>
          <dl class="layui-nav-child">
            <dd><a href="javascript:;">列表一</a></dd>
            <dd><a href="javascript:;">列表二</a></dd>
            <dd><a href="">超链接</a></dd>
          </dl>
        </li>
       <!-- <li class="layui-nav-item"><a href="">云市场</a></li>
        <li class="layui-nav-item"><a href="">发布商品</a></li>-->
						</ul>
					</div>
				</div>

				<div class="layui-body">
					<!-- 内容主体区域 -->
					<iframe src="course/courseList.html" name="main" width="100%" height="99%" frameborder="0">
 您的浏览器不支持iframe，请升级
 </iframe>

				</div>

				<div class="layui-footer">
					<!-- 底部固定区域 -->
					<div class="layui-col-lg-offset4">© - 燕山大学软件工程专业实验管理系统</div>
				</div>
			</div>
		</div>
		<script src="../layui.js"></script>
		<script src="../js/jquery.js"></script>
		<script src="../js/jquery.cookie.js"></script>
		<script>
			$(document).ready(function() {
				$(document).bind("contextmenu", function(e) {
					return false;
				});
			});
			
			
			$.ajax({
				type: "get",
				url: "http://localhost:8080/teacher/experiment/nothing.do",
				data: {
					uid: $.cookie("uid")
				},
				async: false,
				dataType: "json",
				success: function(data) {
					//alert(data.info);
					if(data.info == '404') {
						window.location.href = "login/teacherlogin.html";
					}
				}
			});
			var teacher;
			$.ajax({
				type: "get",
				url: "http://localhost:8080/teacher/info/getTeacher.do",
				data: {
					uid: $.cookie("uid")
				},
				async: false,
				dataType: "json",
				success: function(data) {
					//alert(data.info);
					if(data.info == '404') {
						window.location.href = "login/teacherlogin.html";
					} else {
						teacher = data;
						console.log(teacher);
					}
				}
			});
			//JavaScript代码区域
			layui.use('element', function() {
				var element = layui.element;

			});
			var vue = new Vue({
				el: "#app",
				data: {
					teacher: teacher
				}

			});

			function quit() {
				$.ajax({
					type: "get",
					url: "http://localhost:8080/teacher/info/quit.do",
					data: {
						uid: $.cookie("uid")
					},
					async: false,
					dataType: "json",
					success: function(data) {
						//alert(data.info);
						if(data.info == '404') {
							alert(data.info)
							window.location.href = "login/teacherlogin.html";
						} else {

							window.location.href = "login/teacherlogin.html";
						}
					}
				});
			}
		</script>

	</body>

</html>